package com.code.soulnetty.modbus.biz;

import com.ql.util.express.ExpressRunner;

/**
 * @author lyf
 * @date 2022-12-17 17:54
 */
public class QlExpressRunner {
    public static ExpressRunner expressRunner = new ExpressRunner(true, false);

    private QlExpressRunner() {
    }

    static {
        // NulOperator nulOperator = new NulOperator();
        // expressRunner.addFunction("nul", nulOperator);
        // OperatorAdd operatorAdd = new OperatorAdd("add");
        // expressRunner.addFunction("add", operatorAdd);
        // OperatorReduce operatorReduce = new OperatorReduce("reduce");
        // expressRunner.addFunction("reduce", operatorReduce);
        // SumOperator sumOperator = new SumOperator();
        // expressRunner.addFunction("sum", sumOperator);
        // AvgOperator avgOperator = new AvgOperator();
        // expressRunner.addFunction("avg", avgOperator);
        // DecodeOperator decodeOperator = new DecodeOperator();
        // expressRunner.addFunction("decode", decodeOperator);
        // MyMinMaxOperator myMaxOperator = new MyMinMaxOperator("mymax");
        // expressRunner.addFunction("mymax", myMaxOperator);
        // MyMinMaxOperator myMinOperator = new MyMinMaxOperator("mymin");
        // expressRunner.addFunction("mymin", myMinOperator);
        // NextStatusOperator nextStatusOperator = new NextStatusOperator();
        // expressRunner.addFunction("next_status", nextStatusOperator);
        // FirstGeZeroOperator firstGeZeroOperator = new FirstGeZeroOperator();
        // expressRunner.addFunction("first_ge_0", firstGeZeroOperator);
        // SwitchOperator switchOperator = new SwitchOperator();
        // expressRunner.addFunction("switch", switchOperator);
        // InOperator inOperator = new InOperator();
        // expressRunner.replaceOperator("in", inOperator);
        // EqOperator eqOperator = new EqOperator();
        // expressRunner.replaceOperator("==", eqOperator);
        // GeOperator geOperator = new GeOperator();
        // expressRunner.replaceOperator(">=", geOperator);
        // GtOperator gtOperator = new GtOperator();
        // expressRunner.replaceOperator(">", gtOperator);
        // LeOperator leOperator = new LeOperator();
        // expressRunner.replaceOperator("<=", leOperator);
        // LtOperator ltOperator = new LtOperator();
        // expressRunner.replaceOperator("<", ltOperator);
        // DivOperator divOperator = new DivOperator();
        // expressRunner.addFunction("div", divOperator);
        // MinusOperator minusOperator = new MinusOperator();
        // expressRunner.addFunction("minus", minusOperator);
    }
}
